export function handleRes(res) {
	return new Promise(resolve => {
		if (res.code == 200) {
			uni.showToast({
				title: '成功',
				icon: 'success'
			})
			resolve(true)
		} else {
			uni.showToast({
				title: res.msg,
				icon: 'error'
			})
			resolve(false)
		}
	})
}
export function showLoading(msg){
	uni.showLoading({
		title:msg
	})
}
export function closeLoading(){
	uni.hideLoading();
}
export function showToast(msg,type){
	uni.showToast({
		title:msg,
		icon:type
	})
}